<table>
  <tr align="center">
    <th>Knowledge</th>
    <th>จำนวนข้อ(Max)</th>
    <th>คะแนนต่อข้อ</th>
  </tr>
  <%@knowledges.each_with_index do |k,i|%>
  <tr align="center">
    <td><%=k%><input type="hidden" name="k_<%=i%>" value="<%=k%>"/></td>
    <td><input name="q_<%=i%>" id="q_<%=i%>" type="text" size="4" value="0" onchange="cal_total(<%=@knowledges.size%>)"/>(<%=ExamQuestion.count(:conditions=>["exam_id=? AND group_id=?", @selected_exam.id, "#{k}"])%>)</td>
    <td><input name="s_<%=i%>" id="s_<%=i%>" type="text" size="4" value="1.0" onchange="cal_total(<%=@knowledges.size%>)"/></td>
  </tr>
  <%end%>
  <tr align="center">
    <th>รวม</th>
    <th><div id="total_q">0</div></th>
    <th><div id="total_s">0.0</div></th>
  </tr>
</table>
